export default [
  {
    path: '/',
    component: '../layouts/BlankLayout',
    routes: [
      {
        path: '/user',
        component: '../layouts/UserLayout',
        routes: [
          {
            name: 'login',
            path: '/user/login',
            component: './login',
          },
        ],
      },
      {
        path: '/',
        component: '../layouts/SecurityLayout',
        routes: [
          {
            path: '/',
            component: '../layouts/BasicLayout',
            authority: ['system:user:info'],
            routes: [
              {
                path: '/',
                redirect: '/home',
                authority: ['system:user:info'],
              },
              // home
              {
                path: '/home',
                name: 'home',
                icon: 'home',
                component: './home',
              },
              // account账户
              {
                path: '/account',
                name: 'account',
                icon: 'user',
                routes: [
                  {
                    path: '/account/center',
                    name: 'center',
                    component: './account/center',
                  },
                  {
                    path: '/account/settings',
                    name: 'settings',
                    component: './account/settings',
                  },
                ],
              },
              // system
              // {
              //   path: '/system',
              //   name: 'system',
              //   icon: 'setting',
              //   routes: [
              //     {
              //       path: '/system/departments',
              //       name: 'department',
              //       component: './system/department',
              //       authority: ['system:department:tree'],
              //     },
              //     {
              //       path: '/system/users',
              //       name: 'user',
              //       component: './system/user',
              //       authority: ['system:user:list'],
              //     },
              //     {
              //       path: '/system/roles',
              //       name: 'role',
              //       component: './system/role',
              //       authority: ['system:role:tree'],
              //     },
              //     {
              //       path: '/system/menus',
              //       name: 'menu',
              //       component: './system/menu',
              //       authority: ['system:menu:tree'],
              //     },
              //     {
              //       component: './404',
              //     },
              //   ],
              // },
              // goods
              {
                path: '/goods',
                name: 'goods',
                icon: 'setting',
                routes: [
                  {
                    path: '/goods/increase',
                    name: 'increase',
                    component: './goods/increase',
                    authority: ['system:department:tree'],
                  },
                  {
                    path: '/goods/delete',
                    name: 'delete',
                    component: './goods/delete',
                    authority: ['system:department:tree'],
                  },
                  {
                    path: '/goods/modify',
                    name: 'modify',
                    component: './goods/modify',
                    authority: ['system:department:tree'],
                  },
                  {
                    path: '/goods/query',
                    name: 'query',
                    component: './goods/query',
                    authority: ['system:department:tree'],
                  },
                ],
              },
              // business
              {
                path: '/business',
                name: 'business',
                icon: 'setting',
                routes: [
                  {
                    path: '/business/increase',
                    name: 'increase',
                    component: './business/increase',
                    authority: ['system:department:tree'],
                  },
                  {
                    path: '/business/delete',
                    name: 'delete',
                    component: './business/delete',
                    authority: ['system:department:tree'],
                  },
                  {
                    path: '/business/modify',
                    name: 'modify',
                    component: './business/modify',
                    authority: ['system:department:tree'],
                  },
                  {
                    path: '/business/query',
                    name: 'query',
                    component: './business/query',
                    authority: ['system:department:tree'],
                  },
                ],
              },
              // partner
              {
                path: '/partner',
                name: 'partner',
                icon: 'setting',
                routes: [
                  {
                    path: '/partner/increase',
                    name: 'increase',
                    component: './partner/increase',
                    authority: ['system:department:tree'],
                  },
                  {
                    path: '/partner/delete',
                    name: 'delete',
                    component: './partner/delete',
                    authority: ['system:department:tree'],
                  },
                  {
                    path: '/partner/modify',
                    name: 'modify',
                    component: './partner/modify',
                    authority: ['system:department:tree'],
                  },
                  {
                    path: '/partner/query',
                    name: 'query',
                    component: './partner/query',
                    authority: ['system:department:tree'],
                  },
                ],
              },

              // exception
              {
                path: '/exception',
                name: 'exception',
                icon: 'warning',
                hideInMenu: true,
                routes: [
                  {
                    path: '/exception/403',
                    name: 'not-permission',
                    component: './exception/403',
                  },
                  {
                    path: '/exception/404',
                    name: 'not-find',
                    component: './exception/404',
                  },
                  {
                    path: '/exception/500',
                    name: 'server-error',
                    component: './exception/500',
                  },
                  {
                    component: './404',
                  },
                ],
              },
              {
                component: './404',
              },
            ],
          },
        ],
      },
    ],
  },
  {
    component: './404',
  },
];
